﻿using PluginAPI.Core;
using PluginAPI.Core.Attributes;
using PluginAPI.Enums;
using PluginAPI.Events;
using System;
using System.Collections.Generic;



namespace Server_Management.Event
{
    /// <summary>
    /// 时间通知事件
    /// </summary>
    public class DateTimeNoticeEvent
    {
        /// <summary>
        /// 中译
        /// </summary>
        readonly Dictionary<DayOfWeek, string> dayOfWeek = new Dictionary<DayOfWeek, string>()
        {
            { DayOfWeek.Monday ,   "周一" },
            { DayOfWeek.Tuesday,   "周二" },
            { DayOfWeek.Wednesday, "周三" },
            { DayOfWeek.Thursday,  "周四" },
            { DayOfWeek.Friday,    "周五" },
            { DayOfWeek.Saturday,  "周六" },
            { DayOfWeek.Sunday,    "周日" }
        };


        [PluginEvent(ServerEventType.RoundEnd)]
        public void OnTeamRespwan(RoundEndEvent ev)
        {
            string day = dayOfWeek[DateTime.Now.DayOfWeek];
            string message = $"<color=#00FF7F>[回合播报]</color> 当前时间 {DateTime.Now:HH:mm:ss} | {day}";

            Cassie.Message(message, true, true, true);
        }
    }
}
